package com.jeanbart.factory;


import com.jeanbart.bean.Player;
import com.jeanbart.factory.api.apiImpl.api360;
import com.jeanbart.factory.api.apiImpl.apiWG;
import com.jeanbart.factory.api.wowsAPI;

import java.util.List;

public class wowsUrlFactory {
    //工厂模式
    public wowsAPI getWowsIns(String service, Player player, List<Player> playerList){
        if(service==null)
            return null;
        if(service.equals("CN")){
            return new api360(player);
        }else{
            if(player!=null){
                return new apiWG(player,service);
            }else {
                return new apiWG(playerList, service);
            }
        }

    }
}